﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Top.Net
{
    public class TopDataContext
    {
        public Query<User> Users;

        string AppKey
        { get; set; }

        string SessionKey
        {
            get;
            set;
        }

        public TopDataContext()
            : this(string.Empty, string.Empty)
        {
        }

        public TopDataContext(string appkey):this(appkey,string.Empty)
        {
        }

        public TopDataContext(string appkey,string sessionkey)
        {
            var provider = new TopQueryProvider();
            this.AppKey = appkey;
            this.SessionKey = sessionkey;
            this.Users = new Query<User>(provider);
        }
    }
}
